package java67_adv5;

public class Hero extends Role {

	public void attack(Monster m) {
		while (super.getDefense() > 0) {
			super.setDefense(this.getDefense() - 1);
			if (m.getDefense() > 0)
				m.setDefense(m.getDefense() - 1);
			else {
				m.setLiving(m.getLiving() - 1);
			}
		}
	}

}
